{% extends "toast/base.template.html" %}

{% block breadcrumbs %}
	<li><a href="/toast/address/">Addresses</a> <span class="divider">/</span></li>
	<li><a href="/toast/address/view/{{ address.id }}">{{ address.name }}</a> <span class="divider">/</span></li>
	<li class="active">Edit</li>
{% endblock %}


{% block sidecontent %}
	<div class="btn-toolbar">
		<div class="btn-group">
			<a class="btn" href="/toast/address/view/{{ address.id }}">View</a>
			<a class="btn active" href="/toast/address/edit/{{ address.id }}">Edit</a>
			<a class="btn confirm" href="/toast/address/delete/{{ address.id }}" message="Are you sure you want to delete {[ address.name }}?">Delete</a>
		</div>
	</div>

{% endblock %}

{% block content %}
	<form method="POST">
	{% csrf_token %}
		<h6>{{ form.name.label }}</h6>
		{{ form.name }}
		<p class="text-error">{{ form.name.errors.as_text }}</p>

		<h6>{{ form.street_address.label }}</h6>
		{{ form.street_address }}
		<p class="text-error">{{ form.street_address.errors.as_text }}</p>

		<h6>{{ form.city.label }}</h6>
		{{ form.city }}
		<p class="text-error">{{ form.city.errors.as_text }}</p>

		<h6>{{ form.state.label }}</h6>
		{{ form.state }}
		<p class="text-error">{{ form.state.errors.as_text }}</p>

		<h6>{{ form.postalcode.label }}</h6>
		{{ form.postalcode }}
		<p class="text-error">{{ form.postalcode.errors.as_text }}</p>

		<input class="btn btn-primary" type="submit" name="attendance_edit" value="Save Changes" />

	</form>
{% endblock %}